package com.qf.fmall2204.orders.service;

import com.qf.fmall2204.orders.entity.Orders;
import com.baomidou.mybatisplus.extension.service.IService;

import java.io.IOException;
import java.util.Map;

/**
 * <p>
 * 订单  服务类
 * </p>
 *
 * @author dong
 * @since 2023-04-25
 */
public interface IOrdersService extends IService<Orders> {

    /**
     * 生成订单信息，调用微信支付返回可支付的url
     * @param cids
     * @param orders
     * @return
     */
    Map<String, Object> add(Integer[] cids, Orders orders) throws Exception;

    /**
     * 调用微信支付平台查询订单的支付状态
     * @param oid
     * @return
     */
    String status(String oid) throws Exception;

    /**
     * 处理订单支付成功回调
     * @param orderId
     */
    void paySuccess(String orderId) throws IOException;
}
